package com.flyme.module.file.provider.service;


import com.flyme.common.core.model.query.PagerInfo;
import com.flyme.common.core.model.query.PqGrid;
import com.flyme.core.base.supper.service.IBaseService;
import com.flyme.module.file.client.entity.SysCourseEnroll;

/**
 * @author: flyme
 * @date: 2018/3/7 15:28
 * @desc: 课程报名接口
 */
public interface SysCourseEnrollService extends IBaseService<SysCourseEnroll> {

    /**
     * 查询用户是否申请该课程
     */
     Integer isApply(Long targetId, Long userId, Integer applyType);

    /**
     * 统计课程报名人数
     */
     Integer applyNum(Long targetId,Integer applyType);

    /**
     * 根据用户课程查询记录
     */
     SysCourseEnroll applyRecord(Long targetId, Long accountInfoId, Integer applyType);

    /**
     * 根据用户查询已购买课程
     */
     PqGrid findByUser(Long userId, PagerInfo pagerInfo);
}
